package cn.com.klun.tjy.other.jvm;

import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

public class HeapOOM {
    static class OOMObject{
    }


    public static void main(String[] args) {
        List<int[]> list = new ArrayList<>();

        AtomicInteger atomicInteger = new AtomicInteger();
        AtomicLong atomicLong = new AtomicLong();
        Vector vector = new Vector();

        while (true){
            list.add(new int[100*100]);
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            Runnable a = ()-> System.out.println("线程打印");
            a.run();
            System.out.println("shezhixunijideneicunjianshi");
        }


    }


}
